import request from '@/api/request.js'
//获取部门列表
export function getOrganizationList(params) {
  return request({
    url: `/system/organization`,
    method: 'get',
    params
  })
}

export function removeOrganization(params) {
  return request({
    url: `/system/organization/delete`,
    method: 'delete',
    params,
    paramsSerializer:{
      serialize:function(params){
        const keys = params.organizationPrimaryKeys.map(item=>`organizationPrimaryKeys=${item}`).join('&')
        return `${keys}`
      }
    }
  })
}

export function addOrganization(data) {
  return request({
    url: `/system/organization/create`,
    method: 'post',
    data
  })
}

export function updateOrganization(data) {
  return request({
    url: `/system/organization/update`,
    method: 'patch',
    data
  })
}




